import axios from "../helper/axios";

export async function userRegister(params) {
  try {
    const result = await axios.post('/users/create', params);
    return Promise.resolve(result.data);
  } catch (err) {
    return Promise.reject(err.response.data);
  }
}

export async function userLogin(params) {
  try {
    const result = await axios.post('/users/login', params);
    return Promise.resolve(result.data);
  } catch (err) {
    return Promise.reject(err.response.data);
  }
}


